package com.example.gsp.controller;

import com.example.gsp.config.ConfigBean;
import com.example.gsp.config.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyController {

    @Autowired
    private ConfigBean config;

    @Autowired
    private User user;

    @RequestMapping("hi")
    public String hi() {
        return config.getName() + "is " + config.getAge() + " and the number is " + config.getNumber() + "and the User is " + user;
    }
}
